package net.maku.project.convert;

import net.maku.project.entity.InfoEntity;
import net.maku.project.vo.InfoVO;
import net.maku.project.vo.SimpleInfoVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
* 项目信息
*
* @author lvpb lv941226@gmail.com
* @since 1.0.0 2024-07-08
*/
@Mapper
public interface InfoConvert {
    InfoConvert INSTANCE = Mappers.getMapper(InfoConvert.class);

    @Mapping(target = "transMap", ignore = true)
    @Mapping(target = "pkey", ignore = true)
    InfoEntity convert(InfoVO vo);

    InfoVO convert(InfoEntity entity);

    List<InfoVO> convertList(List<InfoEntity> list);

    SimpleInfoVO convertSimple(InfoEntity entity);

    List<SimpleInfoVO> convertSimples(List<InfoEntity> entities);

}